package com.zsrt.java.day20161229.cg.practice.demo01;

import java.util.Scanner;

public class Wrong03 {
	/**
	 * 完成一个四则运算的功能
	 */
	public static void main(String[] args) {
		int x =7, y = 2;
		Scanner input = new Scanner(System.in);
		System.out.println("输入一个四则算法");
		char oper = input.next().charAt(0);
		input.close();
		switch (oper) {
		case '+':
			System.out.println("x+y ="+(x+y));
			break;
		case '-':
			System.out.println("x-y ="+(x-y));
			break;
		case '*':
			System.out.println("x*y ="+(x*y));
			break;
		case '/':
			System.out.println("x/y ="+(x/y));
			break;

		default:
			System.out.println("输入错误");
			break;
		}
	}
}
